#ifndef THREADEDIMAGEPROVIDER_H
#define THREADEDIMAGEPROVIDER_H

#include <QQuickImageProvider>
#include <QObject>

class ThreadedImageProvider : public QObject, public QQuickImageProvider
{
    Q_OBJECT
public:
    ThreadedImageProvider(QObject *parent = 0);

    QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
    Q_INVOKABLE void fetch(const QString &id);
private:
    void _fetch(const QString &id);
    QImage m_fetched;
};


#endif // THREADEDIMAGEPROVIDER_H
